﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Main.aspx.cs" Inherits="Sys_PersonnelManagement.Web.Main" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rTTiRUKnSWaDu2FjhzWFl8/JuUZMlplyWE/djenb2LoKqkgLGfEGfSrL7XDLoB1M" crossorigin="anonymous"/>
    <link href="../css/main.css" rel="stylesheet" />
    <style>
        .table-condensed tr th {
            border: 0px solid #6e7bd9;
            /*color: white;*/
            /*background-color: cornflowerblue;*/
        }

        .table-condensed, .table-condensed tr td {
            border: 0px solid #000;
        }

        tr:nth-child(even) {
            background: #f8f7ff
       }

        tr:nth-child(odd) {
            background: #fff;
       }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div id="nav">
            当前登录用户:<asp:Label ID="lbl_User" runat="server" Text="Label"></asp:Label>
            <asp:Button ID="btn_UserExit" runat="server" OnClick="btn_UserExit_Click" Text="退出" />
        </div>
        <div id="list">
            <ul>
                <li>
                    <asp:Button ID="btn_home" runat="server" Text="首页" OnClick="btn_home_Click"/>
                </li>
                <li>
                    <asp:Button ID="btn_yggl" runat="server" Text="员工管理" OnClick="btn_yggl_Click" />
                </li>
                <li>
                    <asp:Button ID="btn_bmgl" runat="server" Text="部门管理" OnClick="btn_bmgl_Click" />
                </li>
                <li>
                    <asp:Button ID="btn_xjgl" runat="server" Text="休假管理" OnClick="btn_xjgl_Click" />
                </li>
                <li>
                    <asp:Button ID="btn_swrz" runat="server" Text="事物日志" OnClick="btn_swrz_Click" />
                </li>
                <li>
                    <asp:Button ID="btn_rskq" runat="server" Text="人事考勤" OnClick="btn_rskq_Click" />
                </li>
                <li>
                    <asp:Button ID="btn_jbgl" runat="server" Text="加班管理" OnClick="btn_jbgl_Click" />
                </li>
                <li>
                    <asp:Button ID="btn_gzgl" runat="server" Text="工资管理" OnClick="btn_gzgl_Click" />
                </li>
            </ul>
        </div>
        <div id="content">
            <div id="panel">
                <%--首页--%>
                <asp:Panel ID="pan_main" runat="server">
                     <asp:Image ID="Image1" runat="server" src="/Img/3.jpg" />
                </asp:Panel>
               
                <%--员工管理模块--%>
                <asp:Panel ID="pan_yggl" runat="server" Visible="False" Height="221px">
                    <asp:TextBox ID="txt_UserSearch" runat="server" placeholder="请输入姓名或者ID查询"></asp:TextBox>
                    <asp:Button ID="btn_UserSearch" runat="server" Text="查找" OnClick="btn_UserSearch_Click"/>
                    <asp:Button ID="btn_UserAdd" runat="server" Text="添加用户" OnClick="btn_UserAdd_Click" />
                    <%--ID="datagrid1" UseAccessibleHeader="true" CssClass="table table-condensed table-hover" Width="50%"--%>
                    <asp:GridView ID="gv_yggl" runat="server" Height="124px"  CssClass="table table-condensed table-hover" Width="100%" OnRowUpdating="gv_yggl_RowUpdating" OnRowDeleting="gv_yggl_RowDeleting" AutoGenerateColumns="False" OnRowDataBound="gv_yggl_RowDataBound" RowStyle-HorizontalAlign="Center">
                    <%--<asp:GridView ID="gv_yggl" runat="server" Height="124px" Width="100%" OnRowUpdating="gv_yggl_RowUpdating" OnRowDeleting="gv_yggl_RowDeleting" AutoGenerateColumns="False" OnRowDataBound="gv_yggl_RowDataBound" RowStyle-HorizontalAlign="Center">--%>
                        <Columns>
                            <asp:BoundField DataField="UserID" HeaderText="序号" />
                            <asp:BoundField DataField="UserCode" HeaderText="员工编号" ReadOnly="True" />
                            <asp:BoundField DataField="UserName" HeaderText="员工姓名" />
                            <asp:BoundField DataField="sex" HeaderText="性别" />
                            <asp:BoundField DataField="UserAge" HeaderText="年龄" />
                            <asp:BoundField DataField="FUserNum" HeaderText="员工账号" />
                            <asp:BoundField DataField="FPassword" HeaderText="账号密码" />
                            <asp:BoundField DataField="Phone" HeaderText="手机号" />
                            <asp:BoundField DataField="Email" HeaderText="电子邮箱" />
                            <asp:BoundField DataField="UserDeptID" HeaderText="部门" />
                            <asp:ButtonField ButtonType="Button" CommandName="Delete" Text="删除" />
                            <asp:ButtonField ButtonType="Button" CommandName="Update" Text="修改" />
                        </Columns>
                        <RowStyle />
                    </asp:GridView>
                    <br />
                </asp:Panel>
                  <%--查找显示--%>
                <asp:Panel ID="pan_UserSearch" runat="server" Visible="False">
                    <asp:GridView ID="gv_Search" runat="server" Height="124px" Width="100%" AutoGenerateColumns="False" CellPadding="4" RowStyle-HorizontalAlign="Center">
                        <Columns>
                            <asp:BoundField DataField="UserID" HeaderText="序号" />
                            <asp:BoundField DataField="UserCode" HeaderText="员工编号" ReadOnly="True" />
                            <asp:BoundField DataField="UserName" HeaderText="员工姓名" />
                            <asp:BoundField DataField="UserSex" HeaderText="性别" />
                            <asp:BoundField DataField="UserAge" HeaderText="年龄" />
                            <asp:BoundField DataField="FUserNum" HeaderText="员工账号" />
                            <asp:BoundField DataField="FPassword" HeaderText="账号密码" />
                            <asp:BoundField DataField="Phone" HeaderText="手机号" />
                            <asp:BoundField DataField="Email" HeaderText="电子邮箱" />
                            <asp:BoundField DataField="UserDeptID" HeaderText="部门" />
                          
                        </Columns>
                    </asp:GridView>
                    <asp:Button ID="btn_Hui" runat="server" Text="返回" OnClick="btn_Hui_Click"/>
                </asp:Panel>
        
                <%--员工管理 用户修改--%>
                <asp:Panel ID="pan_ygglUpdate" runat="server" Visible="False">
                    用户名:<asp:TextBox ID="txt_upname" runat="server"></asp:TextBox>
                    <br />
                    性别:<asp:TextBox ID="txt_upsex" runat="server"></asp:TextBox>
                    <br />
                    年龄:<asp:TextBox ID="txt_upage" runat="server"></asp:TextBox>
                    <br />
                    密码:<asp:TextBox ID="txt_uppwd" runat="server"></asp:TextBox>
                    <br />
                    电话:<asp:TextBox ID="txt_upphone" runat="server"></asp:TextBox>
                    <br />
                    邮箱:<asp:TextBox ID="txt_emil" runat="server"></asp:TextBox>
                    <br />
                    所属部门:<asp:DropDownList ID="ddl_updm" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2" DataTextField="DeptName" DataValueField="DeptID">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:PerManageInfoConnectionString13 %>" SelectCommand="SELECT * FROM [a_DeptTable]"></asp:SqlDataSource>
                    <br />
                    <asp:Button ID="btn_ygglupsubmit" runat="server" Height="27px" OnClick="btn_ygglupsubmit_Click" Text="确定" />
                    <asp:Button ID="btn_Upexit" runat="server" OnClick="btn_Upexit_Click" Text="返回" />
                </asp:Panel>

                <%--员工管理 用户添加--%>
                <asp:Panel ID="pan_UserAdd" runat="server" Visible="False">
                    用户代码:<asp:TextBox ID="txt_addUserCode" runat="server" placeholder="例如：001"></asp:TextBox>
                    <br />
                    姓名:<asp:TextBox ID="txt_addname" runat="server"></asp:TextBox>
                    <br />
                    性别:<asp:TextBox ID="txt_addSex" runat="server" placeholder="请输入0或1"></asp:TextBox>
                    <br />
                    年龄:<asp:TextBox ID="txt_addUserAge" runat="server"></asp:TextBox>
                    <br />
                    账号:<asp:TextBox ID="txt_UserNum" runat="server" placeholder="例如：10001"></asp:TextBox>
                    <br />
                    密码:<asp:TextBox ID="txt_AddPwd" runat="server"></asp:TextBox>
                    <br />
                    电话:<asp:TextBox ID="txt_AddPhone" runat="server"></asp:TextBox>
                    <br />
                    邮箱:<asp:TextBox ID="txt_emil0" runat="server"></asp:TextBox>
                    <br />
                    所属部门:<asp:DropDownList ID="ddl_bm" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2" DataTextField="DeptName" DataValueField="DeptID">
                    </asp:DropDownList>
                    <br />
                    <asp:Button ID="btn_yggladdsubmit" runat="server" Height="27px" Text="确定" OnClick="btn_yggladdsubmit_Click" />
                    <asp:Button ID="btn_UserAddExit" runat="server" OnClick="btn_UserAddExit_Click" Text="返回" />
                </asp:Panel>
                
                <%--部门管理模块--%>
                <asp:Panel ID="pan_bmgl" runat="server" Visible="False">
                     <asp:TextBox ID="txt_dSearch" runat="server" placeholder="请输入主管ID查询"></asp:TextBox>
                    <asp:Button ID="btn_dSearch" runat="server" Text="查找" OnClick="btn_dSearch_Click"/>
                    <asp:Button ID="btn_departAdd" runat="server" Text="添加部门" OnClick="btn_departAdd_Click" />
                    <asp:GridView ID="gv_depart" runat="server" OnRowUpdating="gv_depart_RowUpdating" OnRowDeleting="gv_depart_RowDeleting" Width="100%" AutoGenerateColumns="False" RowStyle-HorizontalAlign="Center" OnRowDataBound="gv_depart_RowDataBound">
                        <Columns>
                            <asp:BoundField DataField="DeptID" HeaderText="部门ID" />
                            <asp:BoundField DataField="DeptName" HeaderText="部门名称" />
                            <asp:BoundField DataField="ParentID" HeaderText="上级部门" />
                            <asp:BoundField DataField="DeptHeadID" HeaderText="部门主管" />
                            <asp:ButtonField ButtonType="Button" CommandName="Delete" Text="删除" />
                            <asp:ButtonField ButtonType="Button" CommandName="Update" Text="修改" />
                        </Columns>
                        <RowStyle />
                    </asp:GridView>
                </asp:Panel>

                <%--部门管理 部门添加--%>
                <asp:Panel ID="pan_departAdd" runat="server" Visible="False">
                    部门名称<asp:TextBox ID="txtDeptName" runat="server"></asp:TextBox>
                    <br />
                    上级部门<asp:TextBox ID="txtUpDept" runat="server"  placeholder="请输入上级部门ID"></asp:TextBox>
                    <br />
                    部门主管<asp:TextBox ID="txtDeptHead" runat="server" placeholder="请输入主管编号"></asp:TextBox>
                    <br />
                    <asp:Button ID="btn_departSubmit" runat="server" Text="确定" OnClick="btn_departSubmit_Click" />
                    <asp:Button ID="btn_departAddExit" runat="server" Text="返回" OnClick="btn_departAddExit_Click" />
                </asp:Panel>

                <%--部门管理 部门修改--%>
                <asp:Panel ID="pan_deptUpdate" runat="server" Visible="False">
                    部门ID<asp:TextBox ID="txtDeptID" runat="server"></asp:TextBox>
                    <br />
                    部门名称<asp:TextBox ID="txtDept" runat="server"></asp:TextBox>
                    <br />
                    上级部门<asp:TextBox ID="txtUp" runat="server"></asp:TextBox>
                    <br />
                    部门主管<asp:TextBox ID="txtDeptH" runat="server"></asp:TextBox>
                    <br />
                    <asp:Button ID="btn_deptSubmit" runat="server" Text="确定" OnClick="btn_deptSubmit_Click" />
                    <asp:Button ID="btn_deptReturn" runat="server" Text="返回" OnClick="btn_deptReturn_Click" />
                </asp:Panel>

                <%--部门管理查找--%>
                 <asp:Panel ID="pan_departSearch" runat="server" Visible="False">
                    <asp:GridView ID="gv_deSearch" runat="server" Height="124px" Width="100%" AutoGenerateColumns="False" CellPadding="4" RowStyle-HorizontalAlign="Center">
                        <Columns>
                            <asp:BoundField DataField="DeptID" HeaderText="部门ID" />
                            <asp:BoundField DataField="DeptName" HeaderText="部门名称" />
                            <asp:BoundField DataField="ParentID" HeaderText="上级部门" />
                            <asp:BoundField DataField="DeptHeadID" HeaderText="部门主管" />
                        </Columns>
                    </asp:GridView>
                    <asp:Button ID="btn_dHui" runat="server" Text="返回" OnClick="btn_dHui_Click"/>
                </asp:Panel>

                <%--休假管理模块 --%>
                <asp:Panel ID="pan_xjgl" runat="server" Visible="False">
                    <asp:Button ID="btn_pass" runat="server" Text="审批" OnClick="btn_pass_Click" />
                    <asp:GridView ID="gv_vacation" runat="server" Width="1047px" AutoGenerateColumns="False" RowStyle-HorizontalAlign="Center">
                        <Columns>
                            <asp:BoundField HeaderText="用户ID" DataField="UserName" />
                            <asp:BoundField HeaderText="开始时间" DataField="StaTime" />
                            <asp:BoundField HeaderText="结束时间" DataField="EndTime" />
                            <asp:BoundField HeaderText="天数" DataField="DaysNum" />
                            <asp:BoundField HeaderText="审核" DataField="StatesID" />
                            <asp:BoundField HeaderText="备注" DataField="Remark" />
                        </Columns>
                        <RowStyle />
                    </asp:GridView>
                </asp:Panel>

                <%--休假管理 休假审批--%>
                <asp:Panel ID="pan_pass" runat="server" Visible="False">
                    员工姓名:<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                    <br />
                    开始时间:<asp:TextBox ID="txtStart" runat="server" placeholder="请按照格式填写：如2021/12/25"></asp:TextBox>
                    <br />
                    结束时间:<asp:TextBox ID="txtEnd" runat="server" placeholder="请按照格式填写：如2021/12/25"></asp:TextBox>
                    <br />
                    天数:<asp:TextBox ID="txtDays" runat="server"></asp:TextBox>
                    <br />
                    审批:<asp:DropDownList ID="ddl_sp" runat="server" AutoPostBack="True">
                        <asp:ListItem Value="1">通过</asp:ListItem>
                        <asp:ListItem Value="0">不通过</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    备注:<asp:TextBox ID="txtMark" runat="server"></asp:TextBox>
                    <br />
                    <asp:Button ID="btnPassConfirm" runat="server" Height="27px" OnClick="btnPassConfirm_Click" Text="确定" />
                    <asp:Button ID="btnPassExit" runat="server" OnClick="btnPassExit_Click" Text="返回" />
                </asp:Panel>

                <%--事物日志模块--%>
                <asp:Panel ID="pan_swrz" runat="server" Visible="False">
                    <asp:GridView ID="gv_log" runat="server" AutoGenerateColumns="False" RowStyle-HorizontalAlign="Center" Width="895px">
                        <Columns>
                            <asp:BoundField HeaderText="操作人" DataField="UserName" />
                            <asp:BoundField HeaderText="操作时间" DataField="LogTime" />
                            <asp:BoundField HeaderText="操作事件" DataField="LogRemark" />
                        </Columns>
                        <RowStyle />
                    </asp:GridView>
                </asp:Panel>

                <%--人事考勤模块--%>
                <asp:Panel ID="pan_rskq" runat="server" Visible="False">
                    <asp:GridView ID="gv_UserWork" runat="server" AutoGenerateColumns="False" RowStyle-HorizontalAlign="Center" Width="951px">
                        <Columns>
                            <asp:BoundField DataField="UserWorkID" HeaderText="序号" />
                            <asp:BoundField DataField="UserName" HeaderText="ID" />
                            <asp:BoundField DataField="StaDayTime" HeaderText="上班时间" />
                            <asp:BoundField DataField="EndDayTime" HeaderText="下班时间" />
                        </Columns>
                        <RowStyle />
                    </asp:GridView>
                    <asp:Button ID="btn_sta" runat="server" Text="签到" OnClick="btn_sta_Click" Height="46px" Width="111px" />
                    <asp:Button ID="btn_end" runat="server" Text="下班" OnClick="btn_end_Click" Visible="False" Height="48px" Width="100px" />
                </asp:Panel>
                
                <%--加班管理模块--%>
                <asp:Panel ID="pan_jbgl" runat="server" Visible="False">
                    <asp:GridView ID="gv_Overtime" runat="server" OnRowUpdating="gv_Overtime_RowUpdating" AutoGenerateColumns="False" RowStyle-HorizontalAlign="Center" Width="1045px">
                        <Columns>
                            <asp:BoundField DataField="OvertimeID" HeaderText="序号" />
                            <asp:BoundField DataField="UserName" HeaderText="ID" />
                            <asp:BoundField DataField="StaTime" HeaderText="开始时间" />
                            <asp:BoundField DataField="EndTime" HeaderText="结束时间" />
                            <asp:BoundField DataField="DaysNum" HeaderText="天数" />
                            <asp:BoundField DataField="StatesID" HeaderText="审核" />
                            <asp:BoundField DataField="Remark" HeaderText="备注" />
                            <asp:ButtonField ButtonType="Button" CommandName="Update" HeaderText="审批" Text="审批" />
                        </Columns>
                        <RowStyle />
                    </asp:GridView>
                    <br />
                    <asp:Button ID="btn_OvertimeAdd" runat="server" Text="加班申请" OnClick="btn_OvertimeAdd_Click" />
                </asp:Panel>

                <%--加班管理 申请加班--%>
                <asp:Panel ID="pan_OvAdd" runat="server" Visible="False">
                    开始时间:<asp:TextBox ID="txt_ovSta" runat="server"></asp:TextBox>
                    <br />
                    结束时间:<asp:TextBox ID="txt_ovEdn" runat="server"></asp:TextBox>
                    <br />
                    天数:<asp:TextBox ID="txt_ovDeys" runat="server"></asp:TextBox>
                    <br />
                    备注:<asp:TextBox ID="txt_Remark" runat="server"></asp:TextBox>
                    <br />
                    <asp:Button ID="btn_Ovsubmit" runat="server" Text="确定" OnClick="btn_Ovsubmit_Click" />
                    <asp:Button ID="btn_Ovexit" runat="server" Text="返回" OnClick="btn_Ovexit_Click" />
                </asp:Panel>

                <%--加班管理 加班审批--%>
                <asp:Panel ID="pan_OvUpdate" runat="server" Visible="False">
                    开始时间:<asp:Label ID="lbl_OvSat" runat="server"></asp:Label>
                    <br />
                    结束时间:<asp:Label ID="lbl_OvEnd" runat="server"></asp:Label>
                    <br />
                    天数:<asp:Label ID="lbl_OvDeys" runat="server"></asp:Label>
                    <br />
                    审批:<asp:DropDownList ID="ddl_OvStates" runat="server" AutoPostBack="True">
                        <asp:ListItem Value="1">通过</asp:ListItem>
                        <asp:ListItem Value="0">不通过</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    备注:<asp:Label ID="lbl_Remark" runat="server" Text="Label"></asp:Label>
                    <br />
                    <asp:Button ID="btn_OvupdateSub" runat="server" OnClick="btn_OvupdateSub_Click" Text="确认" />
                    <asp:Button ID="btn_OvUpdateExit" runat="server" OnClick="btn_OvUpdateExit_Click" Text="返回" />
                </asp:Panel>

                <%--工资管理模块--%>
                <asp:Panel ID="pan_gzgl" runat="server" Visible="False">
                    <asp:GridView ID="gv_Wage" runat="server" AutoGenerateColumns="False" Height="72px" Width="320px" RowStyle-HorizontalAlign="Center">
                        <Columns>
                            <asp:BoundField DataField="UserName" HeaderText="用户ID" />
                            <asp:BoundField DataField="MonthlySalary" HeaderText="薪资" />
                        </Columns>
                        <RowStyle />
                    </asp:GridView>
                    <asp:Button ID="btn_money" runat="server" OnClick="btn_money_Click" Text="设置薪资" />
                    <asp:Button ID="btn_HistoryWage" runat="server" Text="历史记录" OnClick="btn_HistoryWage_Click" />
                    <asp:Button ID="btn_HistoryWageSend" runat="server" Text="发薪" OnClick="btn_HistoryWageSend_Click" />
                </asp:Panel>

                <%--工资管理 历史记录--%>
                <asp:Panel ID="pan_HistoryWage" runat="server" Visible="False">
                    <asp:GridView ID="gv_HistoryWage" runat="server" AutoGenerateColumns="False" Height="132px" Width="788px" RowStyle-HorizontalAlign="Center">
                        <Columns>
                            <asp:BoundField DataField="UserName" HeaderText="用户ID" />
                            <asp:BoundField DataField="MonthlySalary" HeaderText="薪资" />
                            <asp:BoundField DataField="FDateTime" HeaderText="发放时间" />
                        </Columns>
                        <RowStyle />
                    </asp:GridView>
                    <asp:Button ID="btn_HistoryWageExit" runat="server" Text="返回" OnClick="btn_HistoryWageExit_Click" />
                </asp:Panel>

                <%--工资管理 确认发薪--%>
                <asp:Panel ID="pan_HistoryWageSend" runat="server" Visible="False">
                    <asp:Button ID="btn_HistoryWageSendTo" runat="server" Text="确认发薪" OnClick="btn_HistoryWageSendTo_Click" />
                    <asp:Button ID="btn_HistoryWageSendExit" runat="server" Text="取消发薪" OnClick="btn_HistoryWageSendExit_Click" />
                </asp:Panel>

                <%--工资管理 设置薪资--%>
                <asp:Panel ID="pan_WageAdd" runat="server" Visible="False">
                    薪资:<asp:TextBox ID="txt_mondyAdd" runat="server"></asp:TextBox>
                    <br />
                    <asp:Button ID="btn_WageAddsubmit" runat="server" OnClick="btn_WageAddsubmit_Click" Text="确定" />
                    <asp:Button ID="btn_WageAddExit" runat="server" OnClick="btn_WageAddExit_Click" Text="返回" />
                </asp:Panel>

                <%--工资管理 薪资修改--%>
                <asp:Panel ID="pan_WageUpdate" runat="server" Visible="False">
                    薪资:<asp:TextBox ID="txt_moneyUpdate" runat="server"></asp:TextBox>
                    <br />
                    <asp:Button ID="btn_WageUpdateSub" runat="server" OnClick="btn_WageUpdateSub_Click" Text="确定" />
                    <asp:Button ID="btn_WageUpdateExit" runat="server" OnClick="btn_WageUpdateExit_Click" Text="返回" />
                </asp:Panel>
            </div>
    </form>
</body>
</html>
